home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / COMM / ANSI_133 / ANSIFUNC.TXT next >
Text File  |  1990-06-03  |  4KB  |  78 lines

  1. Control Sequences
  2.         The following table lists the sequences understood by the
  3.         PingAnsi unit. Differences between PingAnsi and the standard
  4.         ansi.sys are marked with a vertical bar (|). Functions not yet
  5.         implemented are marked with *.
  6.  
  7. Cursor Positioning
  8. Short   Long name               Format          Notes
  9. CUP     cursor position         ESC[y;xH        Sets cursor position.
  10. HVP     cursor position         ESC[y;xf        Same as CUP; not recommended.
  11. CUU     cursor up               ESC[nA          n = # of lines to move
  12. CUD     cursor down             ESC[nB
  13. CUF     cursor forward          ESC[nC          n = # of columns to move
  14. CUB     cursor backward         ESC[nD
  15. DSR     Device Status, Report!  ESC[6n          Find out cursor position.
  16.                         (also interfaced via hook)
  17. CPR     Cursor Position report  ESC[y;xR        Response to DSR, as if typed.
  18.                         Sets ReportedX, ReportedY.
  19. SCP     Save Cursor Position    ESC[s           Not nestable. Saves in SaveX,
  20.                         SaveY.
  21. RCP     Restore Cursor Position ESC[u        GotoXY(SavedX, SavedY);
  22.  
  23. Editing
  24. ED  |   Erase in Display        ESC[0J or ESC[J Clear to end of screen
  25.     |                           ESC[1J  Clear to start of screen
  26.                                 ESC[2J  Clears screen.
  27. EL      Erase in Line           ESC[K   Clears to end of line.
  28. IL  |   Insert Lines            ESC[nL  Inserts n blank lines at cursor line.
  29. DL  |   Delete Lines            ESC[nM  Deletes n lines including cursor line.
  30. ICH |   Insert Characters      *ESC[n@  Inserts n blank chars at cursor.
  31. DCH |   Delete Characters      *ESC[nP  Deletes n chars including cursor char.
  32.  
  33.  
  34. Mode-Setting
  35. SGR     Set Graphics Rendition  ESC[n;n;...nm   See character attribute table.
  36. SM      Set Mode                ESC[=nh         See screen mode table.
  37. RM      Reset Mode              ESC[=nl         See screen mode table.
  38. IBMKKR| Keyboard Key Reass.  (*)ESC[#;"string"p
  39.         This function is not supported, but is interfaced via the
  40.         UserHook KeyAssign(St : String);
  41.  
  42. Character Attributes
  43.         The Set Graphics Rendition command is used to select foreground
  44.         and background colors or attributes.
  45.         When you use multiple parameters, they are executed in sequence, and
  46.         the effects are cumulative.
  47.            Attrib code          Value
  48.                 0               All attributes off (normal white on black)
  49.                 1               Bold
  50. |        2        Dim (not Bold)
  51.                 4               Underline (blue foreground)
  52.                 5               Blink
  53.                 7               Reverse Video
  54.                 8               Invisible (but why?)
  55. |        22        Cancel Bold
  56. |        24        Cancel Underline (white foreground)
  57. |        25        Cancel Blink
  58. |        27        Normal, un-reversed video
  59.                 30-37           foregnd blk/red/grn/yel/blu/magenta/cyan/white
  60.                 40-47           background
  61.  
  62. Screen Modes
  63.         The IBM BIOS supports several video modes; the codes given in the
  64.         BIOS documentation are used as parameters to the Set Mode command.
  65.             Mode Code           Value
  66.                 0               text 40x25 Black & White
  67.                 1               text 40x25 Color
  68.                 2               text 80x25 Black & White
  69.                 3               text 80x25 Color
  70.                 4              *bitmap 320x200 4 bits/pixel
  71.                 5              *bitmap 320x200 1 bit/pixel
  72.                 6              *bitmap 640x200 1 bit/pixel
  73.                 7               (cursor wrap kludge)
  74.  
  75. 'Ansi' music
  76.     Basic like music    Esc[M{string}^C
  77.         read the documentation for Basic Play.
  78.